package top.ligongzi.hrm.controller;

import top.ligongzi.hrm.service.ITenantService;
import top.ligongzi.hrm.service.impl.TenantServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class SysmanageServiceController {

    @Autowired
    private ITenantService tenantService;
    @GetMapping("/sysService/empAndTenant/{loginUserId}")
    @PreAuthorize("hasAuthority('sysService:getEmpAndTenant')")
    public Map<String, Object> getEmpAndTenant(@PathVariable("loginUserId") Long loginUserId) {
        return tenantService.getEmpAndTenant(loginUserId);
    }
}
